<?php

namespace JsonLowCode\UI;

use JsonLowCode\Schema;
use JsonLowCode\Traits\Props\HasBodyStyle;
use JsonLowCode\Traits\Props\HasClosable;
use JsonLowCode\Traits\Props\HasFooterStyle;
use JsonLowCode\Traits\Props\HasHeaderStyle;
use JsonLowCode\Traits\Props\HasNativeScrollbar;
use JsonLowCode\Traits\Props\HasTitle;
use JsonLowCode\Traits\Slots\HasSlotFooter;
use JsonLowCode\Traits\Slots\HasSlotHeader;

class DrawerContent extends Schema
{
    protected string $componentName = "NDrawerContent";

    use HasTitle,HasBodyStyle, HasFooterStyle, HasHeaderStyle, HasClosable, HasNativeScrollbar;

    use HasSlotHeader, HasSlotFooter;

    /**
     * @param string $title
     */
    public function __construct(mixed $title = "", $children = null)
    {
        parent::__construct();
        $this->componentName("NDrawerContent");
        $this->title($title);
        $this->closable();
        $this->nativeScrollbar(false);
        $this->children($children);
    }

    /**
     * 主体可滚动内容节点的样式
     * @param array|string $style
     * @return $this
     */
    public function bodyContentStyle(array|string $style): static
    {
        return $this->prop("body-content-style",$style);
    }



}
